Optimal. Leaf size=32 \[ -\frac{2 c \cos (e+f x)}{f (a \sin (e+f x)+a)}-\frac{c x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0439464, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {2735, 2648} \[ -\frac{2 c \cos (e+f x)}{f (a \sin (e+f x)+a)}-\frac{c x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{c-c \sin (e+f x)}{a+a \sin (e+f x)} \, dx &=-\frac{c x}{a}+(2 c) \int \frac{1}{a+a \sin (e+f x)} \, dx\\ &=-\frac{c x}{a}-\frac{2 c \cos (e+f x)}{f (a+a \sin (e+f x))}\\ \end{align*}
Mathematica [B] time = 0.180096, size = 79, normalized size = 2.47 \[ -\frac{c \left (f x \sin \left (e+\frac{f x}{2}\right )-4 \sin \left (\frac{f x}{2}\right )+f x \cos \left (\frac{f x}{2}\right )\right )}{a f \left (\sin \left (\frac{e}{2}\right )+\cos \left (\frac{e}{2}\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )+\cos \left (\frac{1}{2} (e+f x)\right )\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 43, normalized size = 1.3 \begin{align*} -2\,{\frac{c\arctan \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) }{af}}-4\,{\frac{c}{af \left ( \tan \left ( 1/2\,fx+e/2 \right ) +1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.88392, size = 104, normalized size = 3.25 \begin{align*} -\frac{2 \,{\left (c{\left (\frac{\arctan \left (\frac{\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} + \frac{1}{a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} + \frac{c}{a + \frac{a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.31992, size = 159, normalized size = 4.97 \begin{align*} -\frac{c f x +{\left (c f x + 2 \, c\right )} \cos \left (f x + e\right ) +{\left (c f x - 2 \, c\right )} \sin \left (f x + e\right ) + 2 \, c}{a f \cos \left (f x + e\right ) + a f \sin \left (f x + e\right ) + a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 3.36027, size = 90, normalized size = 2.81 \begin{align*} \begin{cases} - \frac{c f x \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )}}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} - \frac{c f x}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} - \frac{4 c}{a f \tan{\left (\frac{e}{2} + \frac{f x}{2} \right )} + a f} & \text{for}\: f \neq 0 \\\frac{x \left (- c \sin{\left (e \right )} + c\right )}{a \sin{\left (e \right )} + a} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.05113, size = 50, normalized size = 1.56 \begin{align*} -\frac{\frac{{\left (f x + e\right )} c}{a} + \frac{4 \, c}{a{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1\right )}}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]